<h2><%= _("Edit Issue: %{subject}") % {:subject => @issue.subject} %> </h2>

<% form_tag({:controller => :issue, :action => :edit, :id => @issue.id}) do %>
  <table>
    <tr>
      <th>
	<label for="id_subject"><%=h _("Subject:")%></label>
      </th>
      <td>
	<%= text_field :issue, :subject, :maxlength => 100, :size => 60 %>
      </td>
    </tr>
    <tr>
      <th>
	<label for="id_description"><%=h _("Description:")%></label>
      </th>
      <td>
	<%= text_area :issue, :description, :rows => 10, :cols => 60 %>
      </td>
    </tr>
    <tr>
      <th>
	<label for="id_branch"><%=h _("SVN base:")%></label>
      </th>
      <td>
	<%= select :patchset, :branch_id, Branch.find(:all, :order => 'branches.id', :include => [:repository, :category]).collect{|b| ["#{b.repository.name} - #{b.category.name} - #{b.name}", b.id]}, {:include_blank => true} %>
      </td>
    </tr>
    <tr>
      <th>
	<label for="id_base"><%=h _("Base:")%></label>
      </th>
      <td>
	<%= text_field :issue, :base, :size => 60, :maxlength => 1000 %>
      </td>
    </tr>
    <tr>
      <th>
	<label for="id_reviewers"><%=h _("Reviewers:")%></label>
      </th>
      <td>
	<%= text_field :issue, :reviewer_string, :size => 60 %>
      </td>
    </tr>
    <tr>
      <td colspan="2">
	<%=h _("There are require, if you use no-access anonymous subversion repository")%>
      </td>
    </tr>
    <tr><th><label for="id_username"><%=h _("Subversion username:")%></label></th><td>
	<%= text_field :patchset, :username %>
    </td></tr>
    <tr><th><label for="id_password"><%=h _("Subversion password:")%></label></th><td>
	<%= password_field :patchset, :password_base %>
    </td></tr>
    <tr>
      <th>
	<label for="id_closed"><%=h _("Closed:")%></label>
      </th>
      <td>
	<%= check_box :issue, :closed %>
      </td>
    </tr>
    <tr>
      <td>
	<%= submit_tag _("Update Issue") %>
      </td>
    </tr>
  </table>
<% end %>

<p>
<ul>
<li><%=h _("Owner: ")%><%= (logged_in? && @issue.user_id == self.current_user.id) ? _("me") : @issue.user.login %>
<li><%=h _("Created: ")%><%= @issue.created_at %>

<li><%=h _("Last updated: ")%><%= @issue.updated_at %>
</ul>
</p>

<h2><%=h _("Delete This Issue")%></h2>
<% form_tag(:controller => :issue, :action => :delete, :id => @issue.id) do %>
<%= submit_tag _("Delete Issue") %><%=h _("There is no undo!")%>
<% end %>
